package com.szl.sbssh.controller;

import com.szl.sbssh.pageModel.base.PageFilter;
import com.szl.sbssh.pageModel.base.Tree;
import com.szl.sbssh.service.OrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Author: songzhonglin
 * Date: 2018/4/18
 * Time: 10:58
 * Description:
 **/
@Controller
@RequestMapping("organization")
public class OrganizationController {

    @Autowired
    private OrganizationService organizationService;

    @RequestMapping("/manager")
    public String manager() {
        return "/admin/organization";
    }

//    @RequestMapping("/treeGrid")
//    @ResponseBody
//    public List<Organization> treeGrid(Organization org, PageFilter ph) {
//        return organizationService.treeGrid(org,ph);
//    }

    @RequestMapping("/tree")
    @ResponseBody
    public List<Tree> tree() {
        return organizationService.tree();
    }
}
